Processing
MIDI Data from Two MIDI Sources
The MIDI
subsystem can route MIDI messages from two data sources to a single MIDI output
device for concurrent playback. For example, one source can be background music
or a bass line that has been pre-recorded and stored in a file. The second
source can be live data from a MIDI instrument, such as a keyboard or guitar.
Both data
sources send MIDI data to a single MIDI device that is identified with one
handle. Send one data stream by using the midiStreamOut
Send the
second data stream (typically from a MIDI instrument) asynchronously by using
the midiOutShortMsg
Each short
message sent with midiOutShortMsg must be a complete MIDI message, with
a status byte and the appropriate number of data bytes. If the status byte is
omitted, midiOutShortMsg returns an error. (However, there is no running
status with stream output.)